package com.learncloud.entity.vo;

import com.learncloud.entity.SysMenu;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * <p>
 * 菜单详情
 * <p/>
 *
 * @author : yj
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="MenuDetailVo对象", description="菜单详情包含子菜单")
public class MenuDetailVo extends SysMenu {

    public MenuDetailVo(){
        super();
    }

    public MenuDetailVo(SysMenu sysMenu){
        this.setComponent(sysMenu.getComponent()).setStatus(sysMenu.getStatus()).setIcon(sysMenu.getIcon()).setType(sysMenu.getType())
                .setTitle(sysMenu.getTitle()).setSort(sysMenu.getSort()).setSign(sysMenu.getSign()).setPath(sysMenu.getPath()).setParentId(sysMenu.getParentId())
                .setId(sysMenu.getId()).setIsFrame(sysMenu.getIsFrame()).setVisible(sysMenu.getVisible());
    }
    @ApiModelProperty("子菜单列表")
    private List<MenuDetailVo> children;

    @ApiModelProperty("父菜单id列表")
    private List<Integer> parents;
}
